<template>
  <div class="min-h-100vh min-w-100vh">
    <!-- @success="(url: string) => onCropperSuccess(item, url)" -->
    <m-cropper :options="cropperOptions">
      <div class="border flex-column upload__img d-flex ai-center jc-center">
        <i class="text-24 el-icon-plus"></i>
        <p class="text-14">上传图片</p>
      </div>
    </m-cropper>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import MCropper from "@/components/m-cropper/index.vue";
interface ModuleInfo {
  content: string
  url: string
  title: string
  moduleid?: number
}
const cropperOptions = ref({
  autoCrop: true,
  fixed: true,
  fixedNumber: [],
  autoCropWidth: 1,
  autoCropHeight: 1
})
const onCropperSuccess = (item: ModuleInfo, url: string) => {
  item.url = url
}
</script>

<style lang="scss" scoped>
</style>
